This invention relates to a numerical control data forming method in which an automatic programming function is used to readily achieve definition of a machining configuration (or pattern).
A conventional numerical control unit having an automatic programming function is as shown in FIG. 2. In FIG. 2, reference numeral 1 designates a display unit for displaying characters, symbols or graphics; 2, a data input unit for inputting numerical data and characters; 3, an automatic programming unit for forming a machining program; and 4, a numerical control unit for controlling a machine tool according to a machining program. The automatic programming unit 3 carries out a machining configuration definition according to a machining drawing with the aid of the data input unit 2 and the display unit 1, to form a machining program 6. Let us consider the case where, as shown in FIG. 1, in an x-y coordinate system a segment L1 extend from a point PO (0, 0) to a point P1 (50, 0), an arc Cl which is extended from the point P1 to the intersection P2 (a, b) of a CCW (counterclockwise) arc which is described from the point P1 to a point P4 (10, 20) with a radius of 40 and a straight line passing through a point P3 (80, 50) at a gradient of +30.degree. with respect to the x-axis, and a segment L2 extended from the point P2 (a, b) to a point P3 (80, 50) are defined as a machining configuration. With respect to this case, a conventional data inputting procedure with an automatic programming unit will be described with reference to the parts (a), (b) and (c) of the following Table (I):
TABLE I __________________________________________________________________________ LINE FIG. BEND ARC X Y R/.theta. I J __________________________________________________________________________ (a) 10 0 0 20 1 50 0 0 30 3 1 1 10 20 40 15.168 -19.665 40 (b) 10 0 0 20 1 50 0 0 30 3 1 1 40 15.168 -19.665 40 (c) 10 0 0 20 1 50 0 0 30 3 1 1 26.020 18.835 40 15.168 -19.665 40 1 2 80 50 30 50 __________________________________________________________________________
The above-described Table (I) is a part of the machining configuration picture in the automatic programming unit. Necessary data are entered in the Table (I) for definition of the machining configuration. In the Table (I), the LINE column contains an identifier that identifies a separate line in the Table having data that corresponds to the terminal points of the configuration, respectively, and for each line identifier, the other columns indicate the history of the respective terminal point from its preceding terminal point. These columns are used as follows:
FIG (figure): For a straight segment extended from the preceding terminal point, "1" is entered. For a CW (clockwise) arc, "2" is entered, and for a CCW (counterclockwise) arc, "3" is entered. PA1 BEND: When a line is bent to the left with respect to the vector from the preceding terminal point, "1" is entered; and when it is bent to the right, "2" is entered. PA1 ARC: When an arc is of less than 180.degree., "1" is entered; and when it is of 180.degree. or more, "2" is entered. PA1 X : The X-coordinate of the last terminal point of a line is entered. However, in the column "X" of the line 10, the x-coordinate of a configuration definition start point is entered. PA1 Y: The y-coordinate of the last terminal point of a line is entered. However, in the column "Y" of the line 10, the y-coordinate of the configuration definition start point is entered. PA1 R/.theta.: When a straight line is defined, its angle is entered, and when an arc is defined, its radius is entered. PA1 I, J: When a straight line is defined, x and y vectors are entered; and when an arc is defined, the arc center coordinates (x, y) are entered.
In this case, when with a minimum number of data inputted, the definition of a terminal point is switched over to that of the next terminal point, an automatic determination function is carried out so that necessary data are automatically determined and entered in empty columns. When a contradiction occurs, the automatic programming unit outputs an error message.
In the data inputting procedure, first the coordinates (0, 0) of the point PO in FIG. 1 are entered, as a configuration definition start point, in the columns "X" and "Y" of the line 10. The next segment L1 is straight. Therefore, "1" is entered in the column "FIG" of the line 20, and the coordinates (50, 0) of the last terminal point of the segment L1 are entered in the columns "X" and "Y" of the line 20. Under this condition, the line 20 is switched over to the line 30 for data concerning the next segment. In this operation, the automatic determination function is activated so that a gradient of 0 is automatically entered in the empty column position "R/.theta." of the line 20. The arc Cl is a CCW arc, and therefore "3" is entered in the column "FIG" of the line 30. The arc Cl is bent to the left at the point P1, and "1" is entered in the column "BEND" of the line 30. The arc Cl is a small arc, and therefore "1" is entered in the column "ARC". In addition, the coordinates (10, 20) of the point P4 are entered in the columns "X" and "Y", and the arc radius 40 is entered in the column "R/.theta.". Coordinates 10, 20 represent a temporary last point of the arc which will be changed when other configuration data is entered. Upon selection of the next line 40, the automatic determination function is performed, so that the coordinates (15.168, -19.665) of the point P5 in FIG. 1 are entered in the columns "I" and "J" of the line 30. Under this condition, the temporary data in the columns "X" and "Y" of the line 30 are erased, and the further data is entered in the line 40. Specifically, as the segment L2 is straight, and is bent to the right, "1" and "2" are entered in the columns "FIG" and "BEND" of the line 40, respectively. The coordinates (80, 50) of the last terminal point P3 of the segment L2 are entered in the columns "X" and "Y" of the line 40, and the gradient "30" is entered in the column "R/.theta.". Thereafter, a machining configuration definition completion instruction is applied to the automatic programming unit, as a result of which the coordinates of the point P2 are automatically determined and entered in the columns "X" and "Y" of the line 30 which previously has been emptied of temporary data.
In the conventional data inputting procedure with the automatic programming unit, as was described above, after the coordinates (10, 20) of the point P4 have been entered in the columns "X" and "Y" of the line 30, and the coordinates (I, J) of the center of the arc have been automatically determined, the temporary data in the columns "X" and "Y" of the line 30 must be erased. That is, the operation steps back, thus lowering the efficiency of work.